import java.util.Enumeration;
import javax.swing.tree.TreeNode;

public class MonitorDataNode implements TreeNode
{
	private String m_text;
	private boolean m_selected;
	private boolean m_isAlive;
	private MonitorData m_data;
	private TreeNode m_parent;
	
	public MonitorDataNode(TreeNode parent,MonitorData data)
	{
		m_text = data.getMonitorDataType().toString();
		m_selected = false;
		m_data = data;
		m_parent = parent;
		m_isAlive = true;
	}
	
	public boolean getIsAlive()
	{
		return m_isAlive;
	}
	
	public void setIsAlive(boolean isAlive)
	{
		m_isAlive = isAlive;
	}
	
	public void setText(String text)
	{
		m_text = text;
	}
	
	public String getText()
	{
		return m_text;
	}
	
	public boolean getIsSelected()
	{
		return m_selected;
	}
	
	public void setIsSelected(boolean isSelected)
	{
		m_selected = isSelected;
	}
	
	public MonitorData getData()
	{
		return m_data;
	}
	
	public String toString()
	{
		return m_data.getMonitorDataType().toString();
	}

	@Override
	public TreeNode getChildAt(int childIndex) 
	{
		return null;
	}

	@Override
	public int getChildCount() 
	{
		return 0;
	}

	@Override
	public TreeNode getParent() {
		// TODO Auto-generated method stub
		return m_parent;
	}

	@Override
	public int getIndex(TreeNode node) 
	{
		return -1;
	}

	@Override
	public boolean getAllowsChildren() 
	{
		return false;
	}

	@Override
	public boolean isLeaf() 
	{
		return true;
	}

	@Override
	public Enumeration children() 
	{
		return null;
	}
}
